package com.example.aerospacemanagementsystem.service.basicService.impl;

import com.example.aerospacemanagementsystem.entity.basic.Role;
import com.example.aerospacemanagementsystem.entity.basic.Role;
import com.example.aerospacemanagementsystem.mapper.basicMapper.RoleMapper;
import com.example.aerospacemanagementsystem.service.basicService.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 铁殷
* @description 针对表【role】的数据库操作Service实现
* @createDate 2023-10-20 14:12:04
*/
@Service
public class RoleServiceImpl implements RoleService{

    @Autowired
    private RoleMapper roleMapper;

    @Override
    public int add(Role role) {
        return roleMapper.insert(role);
    }

    @Override
    public int delete(Role role) {
        return roleMapper.delete(role);
    }

    @Override
    public int update(Role role) {
        return roleMapper.update(role);
    }

    @Override
    public List<Role> getAllRole(Role role) {
        return roleMapper.getAllRole(role);
    }
}




